\bigskip
{\magonebf  6.8 Panels (panel)}

\def\name{panel}

{\bf 1. Definition}

Panels are windows used for displaying text messages and updating the 
values of variables. A panel $P$ consists of a set of panel items and a set 
of buttons. With each item (except of text items) is associated a variable of 
a certain type (int, bool, string, double, color) whose value can be
manipulated through the item and a string label.

\bigskip
{\bf 2. Creation}

\create  P  (string\ h)

creates an empty panel $P$ with header $h$.


\bigskip
{\bf 3. Operations}
\medskip
\+\cleartabs &\hskip 1.3truecm &\hskip 4.3truecm &\cr
\smallskip
\+\op void   text\_item {string\ s}
                  {adds a text\_item $s$ to $P$.}
\smallskip
\+\op void   bool\_item {string\ s,\ bool\&\ x} {}
\+\nop            {adds a boolean item with label $s$ and variable $x$ to $P$.}
\smallskip
\+\op void   real\_item {string\ s,\ doubel\&\ x} {}
\+\nop            {adds a real item with label $s$ and variable $x$ to $P$.}
\smallskip
\+\op void   color\_item {string\ s,\ color\&\ x} {}
\+\nop            {adds a color item with label $s$ and variable $x$ to $P$.}
\smallskip
\+\op void   int\_item {string\ s,\ int\&\ x} {}
\+\nop            {adds an integer item with label $s$ and variable $x$ to $P$.}
\smallskip
\+\op void   int\_item {string\ s,\ int\&\ x,\ int\ min,\ int\ max} {}
\+\nop           {adds an integer slider item with label $s$, variable $x$, and}
\+\nop           {range $min$,\dots,$max$ to $P$.}
\smallskip
\+\op void   int\_item {string\ s,\ int\&\ x,\ int\ low,\ int\ high,\ int\ step} {}
\+\nop            {adds an integer choice item with label $s$, variable $x$,}
\+\nop            {range $low$,\dots, $high$, and step size $step$ to $P$.}
\smallskip
\+\op void   string\_item {string\ s,\ string\&\ x} {}
\+\nop            {adds a string item with label $s$ and variable $x$ to $P$.}
\smallskip
\+\op void   string\_item {string\ s,\ string\&\ x,list\<string\>\ L} {}
\+\nop           {adds a string item with label $s$, variable $x$, and menu $L$}
\+\nop           {to $P$.}
\smallskip
\+\op void   choice\_item {string\ s,\ int\&\ x,\ list\<string\>\ L} {}
\+\nop          {adds an integer item with label $s$, variable $x$, and choices}
\+\nop          {from $L$ to $P$}
\smallskip
\+\op void   choice\_item {string\ s,\ int\&\ x,\ string s_1,\ string\ s_2, \dots, s_k} {}
\+\nop          {adds an integer item with label $s$, variable $x$, and choices}
\+\nop          {$s_1$, \dots, $s_k$ to $P$ ($k \le 5$)}
\smallskip
\+\op int   button {string\ s}
                  {adds a button with label $s$ to $P$ and returns its number}
\smallskip
\+\op void   new\_button\_line {}
                  {starts a new line of buttons}
\smallskip
\+\op int    open {} 
                  {$P$ is displayed on the screen until a button of $P$ is}
\+\nop            {selected. Returns the number of the button.}
